﻿@{
    Layout = null;
}
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
<title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
     <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["pageIndex"] = s.pageIndex;
            e.customArgs["pageCount"] = s.pageCount;
            e.customArgs["pageRowSize"] = s.pageRowSize;
            e.customArgs["pageRowCount"] = s.pageRowCount;
            e.customArgs["FStatus"] = $("#hidFStatus").val();
            e.customArgs["NSRBMQ"] = $("#hidNSRBMQ").val();
        }

        function TaxFileEdit(codeNo) { 
            
        }

        function AllowanceFileLook(codeNo) {
            window.location.href = rootPath + '/AllowanceFileManage/AllowanceFileEdit?FAllowanceFileID=' + codeNo;
        }

        function AllowanceFileLook2(codeNo) {
            window.location.href = rootPath + '/AllowanceFileManage/AllowanceFileLook?FAllowanceFileID=' + codeNo;
        }

        function AllowanceFileDel(codeNo) {
            if (confirm("确定删除？")) {
                $.ajax({
                    type: 'POST',
                    url: rootPath + '/AllowanceFileManage/DelAllowanceFile',
                    data: { FAllowanceFileID: codeNo },
                    success: function (result) {
                        if (result == "ok") {
                            alert("删除成功");
                            gvEditing.Refresh();
                        } else if (result == "error") {
                            alert("删除失败");
                        } else {
                            alert("参数错误");
                        }
                    }
                });
            }
        }
        function search() {

            $("#hidNSRBMQ").val(NSRBMQ.GetText());
            $("#hidFStatus").val(FStatus.GetValue());
            gvEditing.Refresh();
        }
        function undo() {
            ASPxClientTextBox.Cast("NSRBMQ").SetText("");



            ASPxClientTextBox.Cast("FStatus").SetValue("");


        }
        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnAdd":
                    {
                        //增加
                        window.location.href = rootPath + '/AllowanceFileManage/SelectIssue';
                        break;

                    }
                case "btnMass":
                    {
                        //增加
                        var rs = window.showModalDialog(rootPath + "/MessageDlg?tableName=t_AllowanceIssue&feq=30");
                        break;

                    }
                    
            }
        }
        
    </script>
</head>
<body>
  @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnAdd";
           item.Text = "汇总表生成";
           item.Image.Url = Url.Content("~/Content/ControlImages/addSame.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnMass";
           item.Text = "发送留言";
           item.Image.Url = Url.Content("~/Content/ControlImages/addSame.png");
       });

       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
     <table align="center" class="tableForm">
        <tr>
            <td style="text-align: right; vertical-align: middle" class="tdClass">
                状态:
            </td>
            <td style="text-align: left; vertical-align: middle" class="tdClass">
                @Html.DevExpress().ComboBox(settings =>
      {
          settings.Name = "FStatus";
          settings.Width = 100;
          settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
          settings.Properties.TextField = "Text";
          settings.Properties.ValueField = "Value";
      }).BindList(new List<SelectListItem> { 
                          
                           new SelectListItem { Text = "被退回", Value = "0" },
                           new SelectListItem { Text = "已发送", Value = "1" }
                            //new SelectListItem { Text = "申请复核", Value = "2" }
                      
     }).GetHtml()
            </td>
            <td style="text-align: right; vertical-align: middle" class="tdClass">
                文件名
            </td>
            <td class="tdClass">
                @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRBMQ";
          settings.Width = 200;

      }).GetHtml()
            </td>
            <td align="right" class="tdClass">
            </td>
            <td class="tdClass">
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnSearch";
                settings.Text = "查询";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                settings.ClientSideEvents.Click = "search";
            }).GetHtml()
                @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnUndo";
                settings.Text = "重置";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                settings.ClientSideEvents.Click = "undo";
            }).GetHtml()
            </td>
        </tr>
    </table>
    @Html.Hidden("hidFStatus", "")
    @Html.Hidden("hidNSRBMQ", "")
        @Html.Partial("AllowanceFilePartial", Model)
    <script>
        lp.Hide();
    </script>
</body>
</html>
